<?php
require_once($_SERVER['DOCUMENT_ROOT']."/defaultconf.mex"); ?>
<div id="tabs2"></div>
<script charset="utf-8" type="text/javascript">
Ext.onReady(function(){

 $elem = document.getElementById('tabs2').offsetTop;
 var  windowWidth = 0, windowHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    windowWidth = window.innerWidth
   windowHeight = window.innerHeight-$elem;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
     windowWidth = document.documentElement.clientWidth;
    windowHeight = document.documentElement.clientHeight-$elem;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    windowWidth = document.body.clientWidth;
    windowHeight = document.body.clientHeight-$elem;
  }
    // second tabs built from JS
    var tabs2 = new Ext.TabPanel({
        renderTo: 'tabs2',
        activeTab: 0,
        width:windowWidth-38,
        height: windowHeight-112,
        plain:true,
        defaults:{autoScroll: true},
        items:[{
                title: 'Gestao de Operacoes',
		autoLoad: 'Modules/MX23DF2S/lib/src_invoice.php',
		closable:true
            },{

                title: 'Depositos',
                autoLoad:'Modules/MX23DF2S/lib/src_deposit.php'
            }
        ]
    });

    function handleActivate(tab){
        alert(tab.title + ' was activated.');
    }
});</script>